package com.fly.studio.home.app.constants;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

/**
 * Floor Configuration
 *
 * @author fuliying3
 * @date 2022/08/23 16:40:00
 */
@Getter
@AllArgsConstructor
public enum FloorConfiguration {

    /**
     * 热搜词
     */
    HOT_SEARCH_WORD(1, "hotSearchWord", "HotSearchWordWorker", "热搜词"),
    /**
     * 金刚区
     */
    KING_KONG(2, "kingKong", "KingKongWorker", "金刚区"),
    /**
     * Banner
     */
    BANNER(3, "banner", "BannerWorker", "Banner"),
    /**
     * 弹窗
     */
    POP_UPS(4, "popUps", "PopUpsWorker", "弹窗");

    private final Integer id;
    private final String code;
    private final String handlerName;
    private final String name;

    /**
     * 获取 Handler Name
     *
     * @return Handler Name List
     */
    public static List<String> handlerNameList() {
        List<String> handlerNameList = new ArrayList<>();
        for (FloorConfiguration floorConfiguration : FloorConfiguration.values()) {
            handlerNameList.add(floorConfiguration.handlerName);
        }
        return handlerNameList;
    }
}
